export default {
  namespaced: true,
  state: {
    arr: [
      {
        id: 1,
        check: true,
        cont: "Racing car sprays burning fuel into crowd.",
      },
      {
        id: 2,
        check: false,
        cont: "Japanese princess to wed commoner.",
      },
      {
        id: 3,
        check: true,
        cont: "Australian walks 100km after outback crash.",
      },
      {
        id: 4,
        check: false,
        cont: "Man charged over missing wedding girl.",
      },
      {
        id: 5,
        check: false,
        cont: "Los Angeles battles huge wildfires.",
      },
    ],
  },
  getters: {
    ye(state) {
      return state.arr.length;
    },
  },
  mutations: {
    seek_add(state, data) {
      data.id = state.arr.length;
      state.arr.push(data);
    },
    delarr(state) {
      state.arr = state.arr.filter((item) => item.check != true);
    },
    del(state, ind) {
      state.arr = state.arr.filter((item) => item.id != ind);
    },
  },
  actions: {},
  modules: {},
};
